﻿using RAP.Framework.Libary.Utils;
using RAP.Framework.Libary.DomTemplateBuilder.Interface;

namespace RAP.Framework.Libary.DomTemplateBuilder.Handler.Conditional
{
	/// <summary>
	/// 判断是否为数字的Handler
	/// </summary>
	public class IsNumberHandler : ConditionalHandler
	{
		/// <summary>
		/// 对属性值进行判断
		/// </summary>
		/// <param name="propertyValue"></param>
		/// <param name="rootParamObject"></param>
		/// <param name="parentParamObject"></param>
		/// <param name="context"></param>
		/// <returns></returns>
		protected override bool DoCompareValue ( object propertyValue, object rootParamObject, object parentParamObject, ITemplateRenderContext context )
		{
			return propertyValue.IsNumber ( );
		}
	}
}
